package com.yunji.netty;

import com.yunji.common.utils.TimeUtils;
import com.yunji.system.service.TokenService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Calendar;
import java.util.Date;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.netty
 * @Title: ParseToken
 * @Description: TODO:
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-04-14 14:57:54      V1.0        HuaAo       新建类
 */

public class ParseToken {

    private static TokenService tokenService;


    @Test
    public void test() {

//        Integer[] array={1,2,3,4,5};
//        System.out.println(array[0]);
//        System.out.println(ArraysUtil.toString(array));

        Date nowDate = TimeUtils.getNowDate();
        Date parseDate = TimeUtils.parseDate("2023-12-01 00:00:00");
        int i = TimeUtils.differentByMillisecond(parseDate, nowDate, Calendar.YEAR);
        System.out.println(i);


//        String token = "eyJhbGciOiJIUzUxMiJ9.eyJwaG9uZSI6IjE1OTcyMTg4MDY3Iiwib3BlbmlkIjoib0szaDI1UDJFSkhlYVRfd280RUVhNl9lMDVqbyIsInVzZXJUeXBlIjoidXNlciJ9.58B1i8naGiC4anjeLsR1j9NkEnblByKMrIrWvhmWqJkJJv9S_2UB_hMxV4ItCrGhpjczpKT36iVhvvVXq74Mcw";
//
//        Claims body = Jwts.parser().setSigningKey("abcdefghijklmnopqrstuvwxyz").parseClaimsJws(token).getBody();
//        //String s = (String )body.get();
//        System.out.println(body);
//        //System.out.println(s);
    }
}